package com.goods.controller.business;

import com.goods.business.service.ConsumerService;
import com.goods.common.model.business.Consumer;
import com.goods.common.response.ResponseBean;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "业务管理-出库记录相关接口")
@RestController
@RequestMapping("/consumer")
public class Consumer1Controller {

    @Autowired
    private ConsumerService consumerService;

    //添加物资去处
    @PostMapping("/add")
    public ResponseBean add(@RequestBody @Validated Consumer consumer){
        consumerService.add(consumer);
        return ResponseBean.success();
    }

}
